#include <stdio.h>
#include <Windows.h>

int main()
{
	DWORD start = GetTickCount();
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);
	long long m = 0, n = 0;
	scanf("%lld %lld", &m, &n);
	if ( m < n ) {
		long long tmp = m;
		m = n;
		n = tmp;
	}
	long long l = m % n;
	while ( l != 0 ) {
		m = n;
		n = l;
		l = m % n;
	}
	
	if ( n == 1 ) {
		printf("Yes");
	}
	else {
		printf("No");
	}
	DWORD time = GetTickCount() - start;
	printf("\ntime = %.2f\n", (1000.0 * time) / 905 );
	fclose(stdin);
	fclose(stdout);
	return 0;
}
